file chooser: Stay focused
authorMatthias Clasen <mclasen@redhat.com>
Sun, 28 Apr 2019 16:08:21 +0000 (16:08 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 28 Apr 2019 16:08:21 +0000 (16:08 +0000)
When hitting Escape in the location entry,
we were not moving the focus anywhere,
causing focus to be NULL, and key bindings
to stop working. The visible effect was
that Ctrl-L / Escape / Ctrl-L would not
get back to the location entry, as expected.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1851
gtk/gtkfilechooserwidget.c

index 73b75adfa3d6d9b2220302ece80de33a1fea4055..fcc2ebc5401f952d26534a37c1d3d5a63ea80c9b 100644 (file)
@@ -2482,6 +2482,7 @@ static void
 location_entry_close_clicked (GtkFileChooserWidget *impl)
 {
   location_mode_set (impl, LOCATION_MODE_PATH_BAR);
+  gtk_widget_grab_focus (GTK_WIDGET (impl));
 }
 
 static void